package main

import "fmt"

// 声明一种新的数据类型 是int的一个别名
type myint int

// 定义一个结构体
type Book struct {
	title string
	auth  string
}

// 值传递
func change01(book Book) {

	book.auth = "6666"
}

// 地址传递
func change02(book *Book) {

	book.auth = "7777"
}

func main() {

	var book1 Book
	book1.title = "ogj"
	book1.auth = "zhangsan3"

	fmt.Printf("%v\n", book1)
	change01(book1)
	fmt.Printf("%v\n", book1)
	change02(&book1)
	fmt.Printf("%v\n", book1)

}
